package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntity
import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "se_security_advisor_exam_content")
@TableName("se_security_advisor_exam_content")
@ApiModel(value = "安全顾问考试内容上传")
data class SecurityAdvisorExamContent(

        @ApiModelProperty("岗位培训分支id")
        var jobTrainPartId: String? = null,

        @ApiModelProperty("考试题目")
        var examTitle: String? = null,

        @ApiModelProperty("考试类型(1.单选 2.多选 3.判断)")
        var examType: Int? = null,

        @ApiModelProperty("作业类型")
        var businessType: Int? = null,

        @ApiModelProperty("选项A内容")
        var a: String? = null,

        @ApiModelProperty("选项B内容")
        var b: String? = null,

        @ApiModelProperty("选项C内容")
        var c: String? = null,

        @ApiModelProperty("选项D内容")
        var d: String? = null,

        @ApiModelProperty("1-> A 或者 对; 2-> B获取错 3-> C 4-> D 多选用户逗号拼接")
        var rightAnswer: String? = null,

        @ApiModelProperty("正确答案解析")
        @Column(length = 1000)
        var rightAnswerAnalysis: String? = null
 ) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()


    companion object {
        const val serialVersionUID = 1L
    }
}